//
//  MSProfileViewController.swift
//  SwiftWeibo
//
//  Created by 牟松 on 16/8/1.
//  Copyright © 2016年 DoNews. All rights reserved.
//

import UIKit

class MSProfileViewController: MSBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }

    override func setupUI() {
        super.setupUI()
        
        if !MSAFNManage.shared.userLogin {
            navItem.rightBarButtonItem = UIBarButtonItem(MS_BarButtonItem: "设置",  target: self, action: #selector(rightBarButtonDidClick))
        } else {
            navItem.leftBarButtonItem = UIBarButtonItem(MS_BarButtonItem: "添加好友", target: self, action: #selector(leftBarButtonDidClick))
            
            navItem.rightBarButtonItem = UIBarButtonItem(MS_BarButtonItem: "设置",  target: self, action: #selector(rightBarButtonDidClick))
        }
    }
    // MARK: - 监控事件
    
    @objc private func leftBarButtonDidClick() {
        navigationController?.pushViewController(MSFriendsArrentionViewController(), animated: true)
        
    }
    @objc private func rightBarButtonDidClick() {
        print("聊天")
    }

}
